import 'package:flutter/material.dart';

const Color pageBg = Color(0xff0A1E21);
const Color widgetColor = Color(0xff1D1E33);

class ChildView05 extends StatelessWidget {
  const ChildView05({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('计算结果页面'),
        backgroundColor: pageBg
      ),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            'Your Result', 
            style: TextStyle(
              color: Colors.white,
              fontSize: 40.0,
              fontWeight: FontWeight.w600
            )
          ),
          Expanded(
            child: Container(
              width: double.infinity,
              margin: EdgeInsets.symmetric(vertical: 50.0, horizontal: 16.0),
              decoration: BoxDecoration(
                color: widgetColor,
                borderRadius: BorderRadius.all(Radius.circular(6.0))
              ),
              child: Column(  
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                children: [
                  Text('Normal', style: TextStyle(color: Colors.green, fontSize: 24.0)),
                  Text('18.3', style: TextStyle(fontSize: 54.0, color: Colors.white, fontWeight: FontWeight.w700)),
                  Text(
                    'Your BMI result is quite low, you should eat more.', 
                    textAlign: TextAlign.center,
                    style: TextStyle(
                      color: Colors.white, 
                      fontSize: 18.0
                    )
                  )
                ],
              )
            ),
          ),
          Container(
            width: double.infinity,
            height: 80.0,
            color: Colors.pink[300],
              child: Center(
                child: GestureDetector(
                  onTap: () {
                    Navigator.pop(context);
                  },
                  child: Text(
                    'Return Next Page',
                    style: TextStyle(
                      color: Colors.white,
                      fontSize: 18.0,
                      fontWeight: FontWeight.w600
                    ),
                  )
                )
              )
          )
        ],
      )
    );
  }
}